<style>
#wx-search{}
#wx-search{border-radius: 5px;background: url(/index/img/zoom.png) no-repeat #f1f1f1 10px 20px;padding:20px 0;}
#wx-search div{width: 290px;margin: 0px 0 0 19px;border: none;border-radius: 5px;margin-left:50px;background-color:#fff;border-radius: 5px;}
#wx-search input{background-color: transparent;width:230px;border:none;margin:0;}

</style>

<div class="n-block-bg" style="padding-top:30px;min-height: 800px;">
	<div id="wx-search" class="n-middle" style="width:400px;">
			<form action="<?=n_url('weixin','search')?>">
				<div>
					<input type="text" name="k" value="<?=$data['param']['k']?>" placeholder="请输入搜索内容" />
					<a href="javascript:void(0);" onclick="$(this).parent().parent().submit();"><img src="/index/img/play.png" /></a>
				</div>
			</form>
		
		
	</div>
	
	<?php
	
	if(empty($data['data'])){
	?>
	<div style="text-align: center;font-size:24px;line-height:200px;">
		请输入查询关键词
	</div>
	<?php
	}else{
	?>
		<div style="padding:50px 10px;">
		<table class="n-table n-size-full">
			<tr>
				<th>#</th>
				<th>id</th>
				<th>名字</th>
				<th>分类</th>
				<th>操作</th>
			</tr>
			<?php
			$i = 0;
			foreach($data['data'] as $key=>$val){
				$cate = $data['cate'][$val['cid']];
				
			?>
			<tr>
				<td><?=++$i?></td>
				<td><?=$val['wxid']?></td>
				<td><?=$val['wxname']?></td>
				<?php
				if(empty($cate)){
					?>
					<td><span style="color:#ccc;">暂无分类</span></td>
					<?php
				}else{
					?>
					<td><?=$cate['first_category']?>-&gt;<?=$cate['second_category']?></td>
					<?php
				}
				?>
				<td>
					<?=n_ui(n_url('weixin','updateCategory',array('wxid'=>$val['wxid'])),"修改分类")?>
				</td>
			</tr>
			<?php
			}
			?>
		</table>
		</div>
	<?php
	
	}
	?>
</div>
